Ext.onReady(function(){
	Ext.QuickTips.init();
	var form = new Ext.form.FormPanel({
		labelAlign:'right',
		labelWidth:50,
		url:'form.jsp'
	})
	form.add(new Ext.form.TextField({
		fieldLabel:'文本框',
		name:'text',
		allowBlank:false
	}))
	form.addButton({
		text:'按钮',
		handler:function(){
			Ext.lib.Ajax.request(
				'POST',
				'form.jsp',
				{success:function(response) {
					var result = Ext.decode(response.responseText);
					Ext.Msg.alert('信息', result.msg)
				},failure:function(){}},
				'text=' + encodeURI(form.getForm().getValues(true))
				
			)
		}
	})
	form.render(Ext.getBody())
})